package lab02.Text09;

public class Student {
    //属性：“学号”、“班号”、“姓名”、“性别”、“年龄”
    String sno;
    String class_number;
    String name;
    String gender;
    int age;
    //行为：“获得学号”、“获得班号”、“获得性别”、“获得姓名”、“获得年龄”、“获得年龄”
    //增加一个方法public String toString( )
    public String getSno() {
        return sno;
    }
    public String getClass_number() {
        return class_number;
    }
    public int getAge() {
        return age;
    }
    public String getName() {
        return name;
    }
    public String getGender() {
        return gender;
    }
    public String toString(){
        return (sno+"  "+class_number+"  "+name+"  "+gender+"  "+age);
    }
    public static void main(String[] args) {
        Student he=new Student();
        he.sno="1606101089";
        he.class_number="信本03";
        he.name="zengchanjuan";
        he.gender="女";
        he.age=20;
        System.out.println(he.toString());
    }
}
